
using System;


/**
 *
*/
public class ReplaceUEMacro
{

  public static int Exec(string new_proj_path, string rp_proj_path)
  {
    try
    {
      if (PathUtils.InValid(new_proj_path) || PathUtils.InValid(rp_proj_path))
        return Error.Err_4.code;

      // 新项目路径信息
      var new_proj_info = new UeProjPojo(new_proj_path, Param.NewProjP, GetProjectMacro.Exec);
      // 需要搬到新项目的代码路径信息
      var rp_proj_info = new UeProjPojo(rp_proj_path, Param.RpProjP, GetProjectMacro.Exec);

      MovingCodeToNewProj.Exec(new_proj_info, rp_proj_info);
    }
    catch (UePTException e)
    {
      return e.error.code;
    }
    catch (Exception e)
    {
      // Console.WriteLine(e);
      return Error.Err.code;
    }
    return 0;
  }
}
